<!--
 * @Author: Ln
 * @Date: 2021-04-25 23:33:13
 * @LastEditors: Ln
 * @LastEditTime: 2021-04-26 01:07:17
 * @Description: 注释
-->

<template>
  <div>主页</div>
</template>
<script>
export default {
  name: "inex",

  data() {
    return {};
  },
  mounted() {
    let that = this;
    unit.ajax(
      {
        url: "/npl/greatming/MemberLogin",
        loading: true,
        type: "post",
        data: {
          code: "ctu",
          upwd: "a1075858260",
        },
      },
      function (ret) {
        console.log(ret);
        unit.local.set("userInfo", JSON.stringify(ret.Data.userInfo));
        unit.local.set("token", ret.Data.token);
        that.toReplace("/");
      }
    );
    unit.ajax(
      {
        url: `/api/admin/GetSlideDetails?SlideId=2`,
        type: "get",
      },
      function (ret, err) {
        if (ret.StatusCode == 0) {
          console.log(ret.Data);
        }
      }
    );
    //cookie
    unit.cookie.set("a1", "a1Value");
    var v = unit.cookie.get("a1");
    console.log("获取到的值:", v);
    unit.cookie.del("a1");
    //提示
    unit.toast("xxxxxxxxxxxxxxxxxxxxxxxx");
  },
};
</script>
